package com.heyqing.ems.controller;

import com.heyqing.ems.po.QueryPo;
import com.heyqing.ems.service.EmployeeService;
import com.heyqing.ems.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:EmployeeController
 * Package:com.heyqing.ems.controller
 * Description:
 *
 * @Date:2024/6/27
 * @Author:Heyqing
 */
@Api(value = "员工")
@RestController
@RequestMapping("emp")
@RequiredArgsConstructor
public class EmployeeController {

    private final EmployeeService employeeService;

    /**
     * 列表查询
     *
     * @param queryPo
     * @return
     */
    @ApiOperation("查询列表")
    @PostMapping("list")
    public Result list(@RequestBody QueryPo queryPo) {
        return employeeService.getList(queryPo);
    }
}
